<template>
  <div class="supportCaseBox">
    <div
      class="item"
      v-for="item in supportCaseList"
      :key="item.companyFinancingId"
    >
      <div class="box_now">
        <div class="title">{{ item.companyName }}</div>
        <div class="titleSun">{{ item.post }}</div>
        <div class="img">
          <PublicImage 
            :src="require('@/assets/image/index/ico.png')">
          </PublicImage>
        </div>
      </div>
      <div class="box_time">
        <div class="time1">
          招工时间：{{ item.beginDate + " 至 " + item.endDate }}
        </div>
        <div class="time2">
          招工需求：{{ item.post }}
          <span>招工人数：{{ item.amount + "人" }}</span>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import { getHelpCaseList } from "@/common/api/index.js";
export default {
  data() {
    return {
      supportCaseList: [],
    };
  },
  methods: {
    // 获取帮扶案例列表
    async getHelpCaseList() {
      let param = {
        pageNum: 1,
        pageSize: 6,
      };
      let { code, msg, rows } = await getHelpCaseList(param);
      if (code != "200") return this.$message.warning(msg);
      this.supportCaseList = rows;
    },
  },
  mounted() {
    this.getHelpCaseList();
  },
};
</script>

<style lang="scss" scoped>
.supportCaseBox {
  display: flex;
  flex-wrap: wrap;
  margin-top: 30px;
  background: none;
  .item {
    height: 142px;
    width: 380px;
    border: 1px solid #eeeeee;
    margin-bottom: 20px;
    background: #ffffff;
    box-shadow: 4px 6px 5px 0px rgba(0, 19, 39, 0.04);
    cursor: default;
    .box_now {
      border-bottom: 1px solid #eee;
      padding: 15px;
      text-align: left;
      position: relative;
      .title {
        font-size: 18px;
        font-weight: 700;
        color: #333333;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
      }
      .titleSun {
        font-size: 14px;
        color: #999;
      }
      .img {
        position: absolute;
        right: 10px;
        top: 10px;
        width: 50px;
        height: 50px;
      }
    }
    .box_time {
      padding: 10px 15px;
      text-align: left;
      font-size: 14px;
      color: #999999;
      .time2 {
        span {
          margin-left: 10px;
        }
      }
    }
  }
  .item:nth-child(3n + 2) {
    margin: 0 25px;
  }
}
</style>